import { createRouter, createWebHashHistory, RouteRecordRaw } from 'vue-router'
// interface IRouterList {
//     name?: string,
//     path: string,
//     component?: any,
//     [propname: string]: any
// }
// RouteRecordRaw 内置的类型接口,也可以使用自定义的类型约束: IRouterList[]或者Array<IRouterList>
const routes: Array<RouteRecordRaw> = [
    {
        path: '/',
        redirect: '/test'
    },
    // {
    //     path: '/home',
    //     name: 'home',
    //     component: () => import('../components/layout/index.vue'),
    //     children: [{
    //         path: '/index',
    //         name: 'index',
    //         component: () => import('../views/index/index.vue')
    //     },
    //     {
    //         path: '/monitor',
    //         name: 'monitor',
    //         component: () => import('../views/monitor/index.vue')
    //     }]
    // },
    {
        path: '/test',
        name: 'test',
        component: () => import('../views/test/index.vue')
    },
    {
        path: '/employment',
        name: 'employment',
        component: () => import('../views/employment/index.vue')
    },
    {
        path: '/ecurity',
        name: 'ecurity',
        component: () => import('../views/ecurity/index.vue')
    },
    {
        path: '/device',
        name: 'device',
        component: () => import('../views/device/index.vue')
    }
];
const router = createRouter({
    history: createWebHashHistory(),
    routes
});
export default router;